home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #2 / Amiga Plus CD - 2004 - No. 02.iso / AmigaPlus / Tools / Development / RxMUI / Examples / ListJump.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  2004-01-31  |  3.6 KB  |  129 lines

  1. /* How to link 2 List */
  2.  
  3. signal on halt
  4. signal on break_c
  5.  
  6. l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit
  7. if AddLibrary("rexxsupport.library","rxmui.library")~=0 then exit
  8. call RxMUIOpt("ShowErr DebugMode")
  9. call SetRxMUIStack(24000)
  10.  
  11. call CreateApp
  12. call set("lv0","active",50)
  13. call handleApp
  14.  
  15. /***********************************************************************/
  16. CreateApp: procedure
  17.  
  18.     do i=0 to 100
  19.         entries.i="Entry" i
  20.     end
  21.  
  22.     app.Title="Example"
  23.     app.Version="$VER: Example 1.0 (20.12.00)"
  24.     app.Copyright="©2000, alfie"
  25.     app.Author="alfie"
  26.     app.Description="Just a little example"
  27.     app.Base="EXAMPLE"
  28.     app.Subwindow="Win"
  29.  
  30.      win.ID="MAIN"
  31.      win.Title="Example"
  32.      win.Contents="MGROUP"
  33.  
  34.       mgroup.0="hg"
  35.         hg.class="group"
  36.         hg.horiz=1
  37.  
  38.          hg.0="lister"
  39.           lister.class="listview"
  40.           lister.FixWidthTxT="123456789012345"
  41.           lister.list="list"
  42.            list.frame="inputlist"
  43.            list.active=0
  44.             list.0="Page 1"
  45.             list.1="Page 2"
  46.  
  47.          hg.1="pager"
  48.           pager.class="group"
  49.           pager.pagemode=1
  50.  
  51.            pager.0="page0"
  52.             page0.class="group"
  53.             page0.frame="readlist"
  54.             page0.frametitle=list.0
  55.              page0.0="lv0"
  56.               lv0.class="listview"
  57.               lv0.list="list0"
  58.                list0.frame="inputlist"
  59.                list0.list="entries"
  60.  
  61.            pager.1="page1"
  62.             page1.class="group"
  63.             page1.frame="readlist"
  64.             page1.frametitle=list.1
  65.              page1.0="lv1"
  66.               lv1.class="listview"
  67.               lv1.list="list1"
  68.                list1.frame="inputlist"
  69.                list1.list="entries"
  70.  
  71.       mgroup.1="bg"
  72.        bg.class="group"
  73.        bg.columns=5
  74.        bg.simesize=1
  75.         bg.0=button("Active","_Active")
  76.         bg.1=button("Top","_Top")
  77.         bg.2=button("Bottom","_Bottom")
  78.         bg.3=button("up","_Up")
  79.         bg.4=button("down","_Down")
  80.  
  81.     res=NewObj("application","app")
  82.     if res~=0 then exit
  83.  
  84.     call Notify("win","closerequest",1,"app","returnid","quit")
  85.  
  86.     call Notify("lister","active","everytime","pager","set","activepage","triggervalue")
  87.  
  88.     call Notify("lv0","active","everytime","lv1","set","active","triggervalue")
  89.     call Notify("lv1","active","everytime","lv0","set","active","triggervalue")
  90.  
  91.     call Notify("active","pressed",0,"lv0","jump","active")
  92.     call Notify("active","pressed",0,"lv1","jump","active")
  93.  
  94.     call Notify("Top","pressed",0,"lv0","jump","top")
  95.     call Notify("Top","pressed",0,"lv1","jump","top")
  96.  
  97.     call Notify("Bottom","pressed",0,"lv0","jump","Bottom")
  98.     call Notify("Bottom","pressed",0,"lv1","jump","Bottom")
  99.  
  100.     call Notify("Up","pressed",0,"lv0","jump","Up")
  101.     call Notify("Up","pressed",0,"lv1","jump","Up")
  102.  
  103.     call Notify("Down","pressed",0,"lv0","jump","Down")
  104.     call Notify("Down","pressed",0,"lv1","jump","Down")
  105.  
  106.     call Notify("pager","activepage","everytime","lv0","jump","active")
  107.     call Notify("pager","activepage","everytime","lv1","jump","active")
  108.  
  109.     call set("win","open",1)
  110.  
  111.     return
  112. /**************************************************************************/
  113. handleApp: procedure
  114.     ctrl_c=2**12
  115.     do forever
  116.         call newhandle("APP","H",ctrl_c)
  117.         if and(h.signals,ctrl_c)>0 then exit
  118.         select
  119.             when h.event="QUIT" then exit
  120.             otherwise say h.event
  121.         end
  122.     end
  123. /***********************************************************************/
  124. halt:
  125. break_c:
  126.     exit
  127. /**************************************************************************/
  128.  
  129.